GET_CANOPEN_KERNEL_STATE (FB)¶
FUNCTION_BLOCK GET_CANOPEN_KERNEL_STATE EXTENDS CiA405Base
Gets the current state of the CANopen Kernel. As long as CANopen network is running correctly
the function block returns CANOPEN_KERNEL_ERROR.CANOPEN_KERNEL_NO_ERROR for output STATE
.
The function block detects bus errors, configuration errors, guarding errors and internal system errors (e.g. out of system memory).
- InOut:
Scope
Name
Type
Initial
Comment
Inherited from
Input
NETWORK
USINT
1
CAN network number the function block should operate on. Note: It is not the same like the network number in CANBus configurator. The CiA405
NETWORK
is calculated by NetID + 1. Example: 1 = CAN0, 2 = CAN1, 3 = CAN2, …CiA405Base
ENABLE
BOOL
FALSE
Enables the function block on rising edge. Aborts operation on falling edge.
CiA405Base
TIMEOUT
UDINT
0
Timeout in ms; 0 means no timeout
CiA405Base
Output
CONFIRM
BOOL
FALSE
TRUE
: function block finished without errorCiA405Base
ERROR
CANOPEN_KERNEL_ERROR.CANOPEN_KERNEL_NO_ERROR
Error code: see CANOPEN_KERNEL_ERROR for further details
CiA405Base
STATE
CANOPEN_KERNEL_ERROR.CANOPEN_KERNEL_NO_ERROR
Current stack state.